package com.guyaning.deyson_ec.ec.main.discover;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.ContentFrameLayout;
import android.view.View;

import com.guyaning.deyson_core.core.delegates.bottom.BottomItemDelegate;
import com.guyaning.deyson_core.core.delegates.web.WebDelegateImpl;
import com.guyaning.deyson_ec.ec.R;
import com.guyaning.deyson_ec.ec.R2;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/7/3.
 */

public class DiscoverDelegate extends BottomItemDelegate {

    @BindView(R2.id.web_discovery_container)
    ContentFrameLayout webDiscoveryContainer;


    @Override
    public Object setLayout() {
        return R.layout.delegate_discover;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View rootView) {

    }

    @Override
    public void onLazyInitView(@Nullable Bundle savedInstanceState) {
        super.onLazyInitView(savedInstanceState);

        WebDelegateImpl webDelegate = WebDelegateImpl.create("index.html");

        webDelegate.setTopDelegate(getParentDelegate());

        loadRootFragment(R.id.web_discovery_container,webDelegate);
    }
}
